<?php

namespace app\api\model;

use think\Model;

class Intros extends Model
{
    const ONLINE = 'yes';

    protected $hidden = ['is_show', 'createtime', 'updatetime'];

    public function getLogoAttr($value)
    {
        return $value ? request()->domain().$value : '';
    }

    public function getIntros()
    {
        return self::where('is_show', self::ONLINE)->select();
    }
}
